﻿using System;
using System.Linq;
using System.Reflection;
using System.Windows;
using System.Windows.Controls;
using NDasm.Core;
using NDasm.Core.UI;
using Mono.Cecil;
using NDasm.Core.UI.MethodDasm;
using NDasm.Core.UI.Tree;

namespace NDasm.Standalone
{    
    public partial class MainWindow : Window
    {
        class Inner
        {
            public void Foo()
            {                
            }
        }

        public MainWindow()
        {
            InitializeComponent();
            Test();
        }

        private void Test()
        {
            var dasm = new DasmViewModel(ModuleDefinition.ReadModule(Assembly.GetExecutingAssembly().Location));
            dasmView.DataContext = dasm;            
        }        

        private int TestMethod()
        {
            int f = 0;
            for (int i = 0; i < 100; i++)
            {
                f *= f;
            }
            return f;
        }        
    }
}
